package Spackage;

class Circle extends Shape
{
    private double radius;

    // 构造
    public Circle(double radius)
    {
        this.radius = radius;
    }

    // 实现 area 方法
    public double area()
    {
        return Math.PI * radius * radius;
    }

    // 实现 perimeter 方法
    public double perimeter()
    {
        return 2 * Math.PI * radius;
    }
}

